<?php
/**
 * 部门
 * Created by PhpStorm.
 * User: echa
 * Date: 2018/3/5
 * Time: 20:16
 */
namespace App\Http\Controllers\WarehouseManage;
use App\Http\Controllers\ApiController;
use App\Services\Warehouse\DepartmentService;

class DepartmentController extends ApiController{
    protected $DepartmentService;
    public function __construct(DepartmentService $departmentService)
    {
        $this->DepartmentService=$departmentService;
    }

    /**
     *  获取部门列表
    */
    public function GetDepartmentList()
    {
        try{
            $list = $this->DepartmentService->ListExecuteBillQueryDepartment();
            return $list;
        }catch (\Exception $exception){
            return $this->failed($exception->getMessage());
        }

    }
}